﻿@model IEnumerable<SPDeveloper.Web.Models.Article>
@{
    ViewBag.Title = "All Article";
}
<div id="questions">
    @foreach (var item in Model)
    {

        <div class="question-summary">
            <div class="statscontainer">
                <div class="statsarrow">
                </div>
                <div class="stats">
                    <div class="vote">
                        <div class="votes">
                            <span class="vote-count-post"><strong>0</strong></span>
                            <div class="viewcount">
                                votes</div>
                        </div>
                    </div>
                    <div class="status unanswered">
                        <strong>0</strong>answers
                    </div>
                </div>
                <div class="views" title="5 views">
                    @item.Views views</div>
            </div>
            <div class="summary">
                <h3>
                    <a href="/Article/Details/@item.ArticleId" class="question-hyperlink">@Html.DisplayFor(modelItem => item.Title)</a></h3>
                <div class="excerpt">
                    @item.Content.Trim().Substring(0, 100)
                </div>
                <div class="tags t-2010 t-audience-targeting">
                    <a href="/questions/tagged/2010" class="post-tag" title="show questions tagged '2010'"
                        rel="tag">2010</a> <a href="/questions/tagged/audience-targeting" class="post-tag"
                            title="show questions tagged 'audience-targeting'" rel="tag">audience-targeting</a>
                </div>
                <div class="started fr">
                    <div class="user-info">
                        <div class="user-action-time">
                            asked <span title="2012-04-06 03:47:51Z" class="relativetime">4 hours ago</span></div>
                        <div class="user-gravatar32">
                            <a href="/users/7684/ben-shoemate">
                                <div class="">
                                    <img src="http://www.gravatar.com/avatar/f9fc569cddbb0061fcde7b0b3d9b0325?s=32&amp;d=identicon&amp;r=PG"
                                        alt="" width="32" height="32"></div>
                            </a>
                        </div>
                        <div class="user-details">
                            <a href="/users/7684/ben-shoemate">Ben Shoemate</a><br>
                            <span class="reputation-score" title="reputation score" dir="ltr">1</span></div>
                    </div>
                </div>
            </div>
        </div>
    }
</div>
@section PageTopHeader{
    <div class="subheader">
        <h1 id="h-all-questions">
            All Article</h1>
        <div id="tabs">
            <a class="youarehere" href="/questions?sort=newest" title="the most recently asked questions">
                newest</a> <a href="/questions?sort=featured" title="questions with open bounties"><span
                    class="bounty-indicator-tab">2</span>featured</a> <a href="/questions?sort=faq" title="questions with the most links">
                        faq</a> <a href="/questions?sort=votes" title="questions with the most votes">votes</a>
            <a href="/questions?sort=active" title="questions that have recent activity">active</a>
            <a href="/questions?sort=unanswered" title="questions that have no upvoted answers">
                unanswered</a>
        </div>
    </div>
}
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <thead>
        <tr>
            <th>
                Genre
            </th>
            <th>
                Title
            </th>
            <th>
                Content
            </th>
            <th>
                PostDate
            </th>
            <th>
                UpdateDate
            </th>
            <th>
                LastCommentDate
            </th>
            <th>
            </th>
        </tr>
    </thead>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Genre.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Content)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PostDate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.UpdateDate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LastCommentDate)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.ArticleId }) |
                @Html.ActionLink("Details", "Details", new { id = item.ArticleId }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.ArticleId })
            </td>
        </tr>
    }
</table>
